<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/jsp/common/_includes.jsp" %>
<jsp:include page="/WEB-INF/jsp/common/_head.jsp"></jsp:include>
<link rel="stylesheet" href="/static/vendor/upload/css/jquery.fileupload.css" type="text/css" />
<div class="ui grid">
	<div class="row">
		<div class="column">
			<div class="ui two column grid">
				<div class="three wide column">
					<jsp:include page="/WEB-INF/jsp/common/_sidebar.jsp">
						<jsp:param name="index" value="4"/>
					</jsp:include>
				</div>
				<div id="container" class="thirteen wide column">
					<div class="alert alert-success w200 center-block text-center " style="display: none; " role="alert"></div>
					<ol class="breadcrumb">
						<li><a href="/">后台管理</a></li>
						<li><a href="/admin/ls">主菜单</a></li>
                        <li class="active">文件上传</li>
					</ol>
					
					<input type="hidden" id="attachUrl" name="attachUrl" >
					<div class="form-horizontal">
						<div class="form-group">
							<label for="name" class="col-sm-2 control-label">上传图片</label>
							<div class="col-sm-2">
								<span class="btn btn-success btn-block fileinput-button">
									<i class="glyphicon glyphicon-plus"></i>
									<span>上传图片</span>
									<input id="fileupload" type="file" name="attachFile" data-url="/img/upload">
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/WEB-INF/jsp/common/_foot.jsp"></jsp:include>
<script type="text/javascript" src="/static/vendor/jquery.validate/jquery.validate.js"></script>
<script src="/static/vendor/upload/js/vendor/jquery.ui.widget.js"></script>
<script src="/static/vendor/upload/js/jquery.iframe-transport.js"></script>
<script src="/static/vendor/upload/js/jquery.fileupload.js"></script>
<script type="text/javascript">
  $(function() {
        // 初始化上传组件
        $('#fileupload').fileupload({
            dataType : 'json',
            done : function(e, data) {
                if (data.result.status == 'ok') {
                    alert("上传成功");
                }
            }
        });
    });
</script>